* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "config.h"
+#include <glib/gi18n-lib.h>
+
#include "general.h"
#include "gtkprivate.h"
gtk_switch_set_active (GTK_SWITCH (gen->priv->touchscreen_switch), (gtk_get_debug_flags () & GTK_DEBUG_TOUCHSCREEN) != 0);
g_signal_connect (gen->priv->touchscreen_switch, "notify::active",
G_CALLBACK (update_touchscreen), gen);
+
+ if (g_getenv ("GTK_TEST_TOUCHSCREEN") != 0)
+ {
+ /* hardcoded, nothing we can do */
+ gtk_switch_set_active (GTK_SWITCH (gen->priv->touchscreen_switch), TRUE);
+ gtk_widget_set_sensitive (gen->priv->touchscreen_switch, FALSE);
+ gtk_widget_set_tooltip_text (gen->priv->touchscreen_switch, _("Setting is hardcoded by GTK_TEST_TOUCHSCREEN"));
+ }
}
static void
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "config.h"
+#include <glib/gi18n-lib.h>
#include "visual.h"
#include "gtkprivate.h"
g_hash_table_destroy (t);
gtk_combo_box_set_active (GTK_COMBO_BOX (vis->priv->theme_combo), pos);
+
+ if (g_getenv ("GTK_THEME") != NULL)
+ {
+ /* theme is hardcoded, nothing we can do */
+ gtk_widget_set_sensitive (vis->priv->theme_combo, FALSE);
+ gtk_widget_set_tooltip_text (vis->priv->theme_combo , _("Theme is hardcoded by GTK_THEME"));
+ }
}
static void
g_object_bind_property (vis->priv->dark_switch, "active",
gtk_settings_get_default (), "gtk-application-prefer-dark-theme",
G_BINDING_BIDIRECTIONAL);
+
+ if (g_getenv ("GTK_THEME") != NULL)
+ {
+ /* theme is hardcoded, nothing we can do */
+ gtk_widget_set_sensitive (vis->priv->dark_switch, FALSE);
+ gtk_widget_set_tooltip_text (vis->priv->dark_switch, _("Theme is hardcoded by GTK_THEME"));
+ }
}
static void